The most convenient way is to take a bus from Kamakura Sta.
From Narita and Haneda airport to Kamakura station
JR Yokosuka Line connects Narita airport station directly to Kamakura Station by train(2270 JPY). Along the way, the train also stops at Tokyo, Shinagawa, Yokohama and Kita-Kamakura Station. If you have JR pass, take Narita express and go to Ofuna is the fastest way. You are advised to inquiry at Narita train station for the best way.
From Haneda airport, take Keikyu line and go to Yokohama Station then change to JR Yokosuka Line which will take you to Kamakura statation(820 JPY).