First off, suspended chords ARE in "key" they just substitute the 3rd in the chord with the 4th; and the 4th is still a note in the key signature.
There are a number of methods to figure out the key signature that a song is in. I won't go in to all of them, but you can do a search here and you should find some tips. Once you know the key, you must know the scale that corresponds to that key. And you should learn to play it anywhere on the neck.
Lastly, you will find that most popular songs do not adhere to one particular key signature; if you are in the key of A major, the C# chord should be a minor, but if it fits the song, it can be a major. Songs will also borrow a chord from a different key; for example, if a song is in the Key of A Major, it may borrow a chord from the key of A minor.
Also, as a bassist, your choice of notes does not need to adhere to the current key signature. Again, if you are in the key of A major, and the guitarist is playing an A major chord, I will often play a G natural over it, which actually makes the chord an A7, where a G# would more accurately fit the key signature (making it an A maj7).
I suggest finding a GOOD instructor who can introduce you to music theory.
- E.