Can things like infidelity, crime, or immoral behaviour make a heir ineligible for succession of the British throne?
There are a number of things that would make you legally ineligible to succeed to the throne, but infidelity, (normal) criminal activity and immoral behaviour aren't to be found on that list.
So, what would make you legally inadmissable?
The Succession to the Crown Act 2013 indicates that if you're within the top six in line to the throne and you marry without the Queen's permission, you're disqualified from holding the throne, as are any offspring that results.
A person who (when the person marries) is one of the 6 persons next in the line of succession to the Crown must obtain the consent of Her Majesty before marrying.
The effect of a person’s failure to comply with subsection (1) is that the person and the person’s descendants from the marriage are disqualified from succeeding to the Crown.
The original Act of Settlement 1701 says that you have to be a direct descendant of Princess Sophia. Adopted children are therefore ineligible.
That the most Excellent Princess Sophia Electress and Dutchess Dowager of Hannover Daughter of the most Excellent Princess Elizabeth late Queen of Bohemia Daughter of our late Sovereign Lord King James the First of happy Memory be and is hereby declared to be the next in Succession in the Protestant Line to the Imperiall Crown and Dignity of the [said] Realms of England France and Ireland with the Dominions and Territories thereunto belonging after His Majesty and the Princess Ann of Denmark and in Default of Issue of the said Princess Ann and of His Majesty respectively and that from and after the Deceases of His said Majesty our now Sovereign Lord and of Her Royall Highness the Princess Ann of Denmark and for Default of Issue of the said Princess Ann and of His Majesty respectively the Crown and Regall Government of the said Kingdoms of England France and Ireland and of the Dominions thereunto belonging with the Royall State and Dignity of the said Realms and all Honours Stiles Titles Regalities Prerogatives Powers Jurisdictions and Authorities to the same belonging and appertaining shall be remain and continue to the said most Excellent Princess Sophia and the Heirs of Her Body being Protestants
Children born out of wedlock that are later legitimised are also excluded since the Legitimacy Act 1959 specifically excludes Succession to the Throne.
It is hereby declared that nothing in this Act affects the Succession to the Throne.
Catholics are explictly disqualified by the original Act of Settlement 1701. This includes former Catholics, even if they've converted to the Protestant faith. Anyone who converts to Catholicism is also disqualified.
Provided always and it is hereby enacted That all and every Person and Persons who shall or may take or inherit the said Crown by vertue of the Limitation of this present Act and is are or shall be reconciled to or shall hold Communion with the See or Church of Rome... should be excluded and are by that Act made for ever incapable to inherit possess or enjoy the Crown and Government of this Realm and Ireland and the Dominions thereunto belonging or any part of the same or to have use or exercise any regall Power Authority or Jurisdiction within the same.
A direct refusal to take the Coronation Oath would invalidate your accession. Presumably the crown would then be offered to the next eligible heir.
every King and Queen of this Realm who shall come to and succeed in the Imperiall Crown of this Kingdom by vertue of this Act shall have the Coronation Oath administred to him her or them at their respective Coronations according to the Act of Parliament made in the First Year of the Reign of His Majesty and the said late Queen Mary intituted An Act for establishing the Coronation Oath and shall make subscribe and repeat the Declaration in the Act first above recited mentioned or referred to in the Manner and Form thereby prescribed
The rules for becoming the new English monarch:
Have the biggest army. If there's someone else with a bigger army that wants to take the throne, you're going to need to engage in some "vigorous diplomacy" over the matter (read: there's probably going to be a civil war, and whoever wins it gets the Crown).
Don't be Catholic. Because the English monarch is also the head of the Church of England, you need to either be a member of the Church of England, or convert to the Church of England upon your ascension to the Crown, and Catholics are disallowed for historical reasons involving "vigorous diplomacy".
Don't be a bastard. Only the children of the monarch and their official spouses need apply; in the terms of the legal documentation, bastards and Catholics both referred to as "legally dead" for the purposes of the succession.
Be the eldest child. Before 2013, there were additional rules regarding the gender of the children, but they were revised to strike the "male" from "male primogeniture". If the oldest child is dead, the crown will pass to their oldest child, and will only revert back up a level if there are no living heirs, before heading back down the tree; legally dead individuals and their heirs don't count for this process.