As Danelius90 said, you can simply ask an AI to switch their Civics on the trading screen--you know, the screen where you can trade techs, trade Resources, ask for Open Borders, etc.
At the bottom of the options, you will get choices to switch an AI's Civics and Religion. Often, these values are blank. Certain game conditions have to be met before these options will appear.
For Civics, you can only ask an AI to join you in your own Civic selections. So, if you have switched from the Government Civic of Despotism into Hereditary Rule, and if you contact an AI and look at their trading screen, you will have the option to ask them to switch into Hereditary Rule--provided that they are not already running Hereditary Rule. You will be unable to ask the AI to switch into any other Civic than the set of Civics that you are currently running.
Similarly, you must be running a State Religion and not be running the Free Religion Civic if you wish to ask an AI to switch their State Religion. That AI must also be running a different Religion and not be running Free Religion if you would like to ask them to switch Religions. It is also possible to ask an AI to switch Religions if they are not running a Religion, but since an AI that receives a Religion will switch to that Religion on the following turn and will not switch back to "No State Religion," this case rarely comes up practically--although if that AI receives two different Religions on the same turn as being in "No State Religion," it is feasibly possible for you to get them to choose the one that you ask them to pick. If the AI is in Free Religion, then you must not be running Free Religion as a Civic yourself, then you must get them to switch to your Religious Civic, and only then will you have the option to ask them to switch their State Religion.
However, there are other requirements involved.
Generally, you need to get an AI to be Friendly with you before they will agree to make the change to their Civics or Religion. Some AIs will switch if they are only Pleased or Cautious with you, but getting the AI up to a Friendly status will cover all AIs.
On top of that requirement, the AI must not be running their Favourite Civic... in Vanilla and Warlords, if an AI is running their Favourite Civic, then you can not ask them to switch any of their Civics, but you could still feasibly ask them to convert to your State Religion. In Beyond the Sword, the code works a little better, in that an AI who is running their Favourite Civic will not be able to switch out of their Favourite Civic, but you can ask them to switch their Civics in the other 4 Civics categories.
As an additional requirement, this option doesn't come for free--generally, you will have to pay a modest sum of Gold (I've seen values between 120 Gold and 800 Gold just to switch one Civic or Religion) and/or a tech or multiple technologies. It is possible for you to ask an AI nicely to switch if they are Pleased or Friendly towards you (i.e. ask them to do it for free), but doing so is generally not going to work, while asking them for a more modest request, like 100 Gold or less, has a higher chance of working in your game. If you do choose this "ask them to do something for free" approach, realise that you should first have them being Pleased or Friendly with you, otherwise they will irreperably get mad at you for demanding something out of them. Further, in Beyond the Sword, if they accept your request (or even your demand, should you accidentally ask them when they are Cautious or lower in attitude towards you), then a 10-turn Peace Treaty between your two Civs will be enforced... generally, it's just better to plan to pay their requested price.
Further, the AI must not have switched Civics in the last 5 turns, otherwise these options will not appear. If you don't see the options but you think that you have met all of the other requirements, then check your Event Log (the icon at the top left of your screen opens the Event Log) and scroll back for the last 5 turns, to see if that AI switched their Civics... if they AI did switch, then you will have to wait for 5 turns after their last switch and should be able to ask them to switch on the 6th turn. The same is true for Religious-switching--if they recently switched Religions, then you'll have to wait for those 5 turns to pass.
Also, as Danelius90 mentioned, you can use Espionage Points in Beyond the Sword (these Espionage Points don't exist in Vanilla or Warlords, so you can't use them in those game versions) in order to get an AI to switch their Civics or their Religion.
First, you'll need a large number of Espionage Points, as well as a Spy unit sitting in an AI's City. If you can let the Spy move there, end its turn, and then end its turn 5 more times before performing the Spy Mission to switch Civics or Religion, then you'll get a considerable discount on the number of Espionage Points that you will need to spend.
Your Spy could fail at its mission, but if it fails, then you won't lose the Espionage Points and you can try the process again with another Spy. As a result, it often pays to send multiple Spies into different AI Cities, to increase your odds of success. Realise, though, that Spies work better alone--if you send multiple Spies to do jobs in the same City, then they will step on each others' toes and will increase the chance of them being automatically discovered by the AI and immediately executed on the spot!
As with paying an AI, you must first be running the State Religion that you want to switch the AI into and you must first be running the Civics that you want to switch the AI into.
Other rules are similar, too... if you want to switch an AI's Religion but the AI is running Free Religion, you must first be running a different Religious Civic yourself, then you must switch their Religious Civic, and only then will another Spy get the option to switch the AI's State Religion to your own State Religion.
One point that I am not certain about is whether you have to wait for a period of 5 turns after an AI switched their Civics before you can switch their Civics and similarly have to wait for 5 turns after an AI switched their Religion before you can switch their Religion. Perhaps someone else can clarify this detail.
Now that I think about it, I'm not sure if you can ask an AI to switch into "No State Religion," nor do I know if you can get an AI to switch into "No State Religion" using a Spy, but I think that doing so would be counter-productive... if you get an AI to switch their Civics or their Religion, it is possible that they will choose to switch back in 5 turns, but it is also possible that they will keep your selection. However, even if the option to switch them into "No State Religion" does exist, then they will for certain switch out of it after 5 turns have passed, since the AIs hate running the "No State Religion" Religious choice and will switch out of it as soon as possible.
As an aside, I will say that it is possible to get an AI to switch into "bad" Civics, such as getting them to switch into Pacifism when they have a very large army, forcing them to pay a lot of extra Maintenance Costs in order to maintain their army. However, in order to "pick" an AI's Civics or Religion, you'll have to first pick those same Civics or State Religion yourself... which is okay to do as a Spiritual Leader, or perhaps during a Golden Age in Beyond the Sword where switching has no cost (do not switch during a Golden Age when playing Vanilla or Warlords, though, as then you just lose out on turns of your Golden Age), but outside of those cases, you're probably hurting yourself more by switching back and forth than you are hurting the AI.
In summary, there are ways "within the rules of the game" without needing to cheat in order to do what you want to accomplish, but the game makes you work to achieve these goals. In particular, getting an AI to be Friendly towards you generally takes time and effort.
Therefore, no cheats were coded into the World Builder to allow you to make these changes, since feasibly, you can just play by the rules and be able to make the AIs make their changes. Plus, allowing this option in "cheat mode" could make it far too easy to greatly disrupt the balance of the game--it would be more disruptive than giving yourself a free Artillery in 4000 BC, in my opinion, so I'm kind of glad that the "cheat mode" does not offer you this option. Still, if you work hard at getting AIs to be Friendly towards you, you will find that many other benefits start to appear, so I think that it is a very worthwhile endeavour to try and get a couple of the AIs in the game to Friendly status, at which point it usually just takes some Gold or techs in order to manipulate them to "join your way of Civic thinking or Religious practices."