Order Entries Query by a Featured Light Switch
You're looking for the filter filter. Here's how you might do it:
{% set entriesInCat = craft.entries.relatedTo(category).all() %}
{% set featuredEntriesInCat = entriesInCat|filter(entry =&gt; entry.yourLightswitchFieldHandle) %}
{% set remainder = entriesInCat|without(featuredEntriesInCat) %}

{% for item in featuredEntriesInCat %}
    &lt;h2&gt;{{ item.title }}&lt;/h2&gt;
{% endfor %}

&lt;hr&gt;

{% for item in remainder %}
    &lt;h2&gt;{{ item.title }}&lt;/h2&gt;
{% endfor %}