I used to play bass and now I switched to guitar but im worried because I dont know much music theory. What important things in music theory do you recomend I learn and also where and how is the best way to learn it?
I have a book called "Music theory, everything you wanted to know, but were afraid to ask". It is a Hal Leonard book written specifically for guitar, and I have found it very helpful. It's cheap too, and has ear training exercises on the CD included.

Also I suggest you check out the CAGED system.