An invitation is just that - an invitation. People who are trolling for gifts can be ignored - you are under no obligation to send a gift. Your only obligation is to RSVP. So many people don't realize this that it has become customary for the hosts to enclose a reply card, already stamped no less! You can send your regrets and then decide whether to send a gift or not. A card is a nice gesture but actually not required by etiquette. However, if they are sending you notification of a significant event, it is really nice to send a card with your handwritten good wishes. Sending an email is NOT really okay in this sort of situation!
If it is an event you would have attended except for a conflict, then it's nice to send a gift. If these are people you have not seen or even especially been in contact with, then do not feel obligated to send a gift. Depending on the customs in your family, you can send a gift to everyone or just to those who are close and that you see frequently. Huge families usually don't send gifts to every cousin, but smaller ones or those with frequent get-togethers usually do.
Someone in the family should let you know where the wedding couple is registered. I make it a practice to IGNORE those wedding couples who themselves direct us to websites listing all their wants and wishes - I find it tasteless and offensive. If I want to know where they are registered, I will ask them or, more properly, I will ask the parents who are generally the ones issuing the invitation. Under no circumstances - and you can check Miss Manners or Emily Post for confirmation - should you consider it your obligation to send a gift, particularly if you suspect that is the only reason you have been invited!
However, if you accept the invitation, then you are obligated to attend - the family will have paid for your dinner in advance and set a table assignment. You should provide a gift if you attend, but please do not bring it to the wedding - send it beforehand or afterwards.
Graduation parties are a little more informal. If you attend, bring a gift or a check for the graduate. Usually they just want cash or gift cards. I think it is nice to give them a gift card to the college bookstore if they will be continuing in school - it lets them get some college shirts or other stuff. My son LOVED doing this. It was kind of nice for them to have a gift they could use later, rather than just cash they wound up spending during the summer. Or you can order a shirt or other items but leave the tags on so the kid can exchange them.
College graduations - they usually want cash unless they are setting up an apartment, and then a gift card to a store that supplies household goods would be nice.