He discussed energy security and other issues in Saudi Arabia and the United Arab Emirates on Wednesday.
He said a global coalition was needed “to deal with the new reality we face”.
But critics have expressed concerns about the human rights records of the countries.
Last weekend, Saudi Arabia carried out a mass execution of 81 men in one day, and its Crown Prince Mohammed bin Salman has been implicated in the murder of Washington Post journalist Jamal Khashoggi in 2018.
On Wednesday, Saudi news agency SPA announced three further executions, in what the Reprieve group described as a “provocative act” designed to “flaunt the Crown Prince’s power”.
Labour leader Sir Keir Starmer said “going cap in hand from dictator to dictator is not an energy strategy”.
Hatice Cengiz, the fiancee of Mr Khashoggi, told the BBC Mr Johnson should not be “doing deals” with Crown Prince Salman unless he insisted “on the truth and justice for Jamal’s murder”.
Labour deputy leader Angela Rayner told MPs Mr Johnson was on “a begging mission to the Saudi prince” after failing to invest in home-grown energy.
But Mr Johnson said if western countries wanted to “avoid being blackmailed” by Russia’s President Vladimir Putin, they needed to move away from using his country’s fossil fuels and explore other partnerships.
Asked about working with a government with a questionable human rights records, the prime minister said: “I’ve raised all those issues many, many times – since I was foreign secretary and beyond and I’ll raise them all again today.”
He pointed towards Saudi Arabia announcing a £1bn investment in green aviation fuel in the UK as “the kind of thing we want to encourage”.
That does not mean, he added, that “we can’t stick to our principles and raise those issues that we all care about”.
Foreign Secretary Liz Truss also defended the trip on Breakfast, insisting the UK was “absolutely right” to “look at alternative sources of oil and gas”.