At least 15 people were killed in a suicide bombing on an Israeli-owned hotel in the Kenyan coastal resort of Mombasa in 2002. Four years earlier, more than 200 people were killed in co-ordinated bomb blasts on the US embassies in Kenya and Tanzania.
Al-Qaeda carried out the attacks, with some of its senior members operating from Somalia.
Mr Odinga - who is accompanied on the visit by Internal Security Minister George Saitoti - said Israel could help Kenya's police force detect and destroy al-Shabab's networks in Kenya.
Kenya also needed Israel to provide vehicles for border patrols and equipment for sea surveillance to curb piracy off the East African coast, he said. "We need to be able to convincingly ensure homeland security," Mr Odinga said.
The statement quoted Mr Netanyahu as promising to help build a "coalition against fundamentalism" in East Africa, incorporating Kenya, Ethiopia, South Sudan and Tanzania.
Israel's President Shimon Peres had promised to "make everything available" to Kenya to guarantee its security within its borders, the statement said.
"Consistently, Kenya has shown a very positive attitude towards Israel and Israel is ready to help," the statement quotes Mr Peres saying.
Kenya accuses al-Shabab of abducting several people from its territory since September - including an elderly French woman who suffered from cancer. French authorities say she has since died in Somalia.
Al-Shabab denies involvement in the abductions and has vowed to retaliate against Kenya for sending troops into Somalia. It has accused the Kenyan army of killing civilians.
Last month, a Kenyan man, Elgiva Bwire Oliacha, told a court in Nairobi that he was an al-Shabab member.
He pleaded guilty to carrying out grenade attacks on a nightclub and bus stop in the city, leaving one person dead and 29 others wounded.
Somalia has been without an effective government since 1991, with al-Shabab controlling most of the southern and central regions.