RB1 (and at least one spinoff, the AC/DC track pack) are not compatible with the GH peripherals, but as of RB2 the two sides came to an agreement to make their instruments compatible.
Note that if you have RB2, you can import the AC/DC songs into it for free (with a one-time code), which I assume would allow you to play them with the GH guitar. Likewise, you can import the RB1 songs into RB2, but there's a fee ($5 IIRC).
When Rock Band 1 and Guitar Hero 3 came out (fall 2007) each company ended up making their games only work with their respective instruments. Starting with Rock Band 2 (and the AC/DC track pack) and Guitar Hero: World Tour, all of the guitars/drums/microphones should work with those games and any games in those series going forward.
There is a chart somewhere that Harmonix made that shows which games and instruments for which platforms work together. I forget where it is. Your best bet to find it are Google or Wikipedia.
IIRC, any instrument for RB2 or GHWT, or later, will work equally with "the other game" or later versions. It is backwards compatibility which is slightly problematic: I know GHWT drums don't work on RB1, and assume vice-versa as well, although as noted you can import most RB1 tracks into RB2 and play them in RB2 using GHWT instruments without trouble. A GH3 guitar should work on RB2 etc anyway, not entirely sure about RB1 but my best guess is it does work. I know a GHWT guitar DOES work with RB1 (I have the GHWT instruments, and have used the guitar to play RB1; drums don't work).
Also, for drums specifically, note that GHWT uses 5 lanes, RB only 4. GHWT (and later games) can detect if you are using RB2 drums, and will downmix the 'missing' orange lane notes (to mostly green, IIRC) for use on RB2 drums, which don't have orange notes.