Inserting into Group_roles table for all rows in Group table
if not exists
    (SELECT gr.*
     FROM Group.g INNER JOIN GROUP_ROLES gr ON g.id = gr.group_id INNER JOIN ROLE r ON gr.roles_id = r.id
     WHERE r.name = 'newRole' AND g.name IN ('Group1', 'Group2', 'Group3', 'Group4', 'Group5'))
begin
INSERT INTO GROUP_ROLES (group_id, roles_id)
    SELECT g.id AS group_id, r.id AS roles_id
    FROM Group g CROSS JOIN ROLE r
    WHERE r.name = 'newRole' AND g.name IN ('Group1', 'Group2', 'Group3', 'Group4', 'Group5')
end


Basically, you can INSERT the results of a SELECT query into the table.  So first get the SELECT query right so that it returns the five rows that you want and then just add the INSERT clause at the beginning.  Note that I gave the columns aliases that matched the destination columns, but that's actually unnecessary.  I did it purely because I find having two id columns confusing.  

SQL Server documentation of INSERT with a SELECT subquery.

According to INSERT INTO SELECT to avoid duplicates, you could also write 

INSERT INTO GROUP_ROLES (group_id, roles_id)
    SELECT g.id AS group_id, r.id AS roles_id
    FROM Group g CROSS JOIN ROLE r
    WHERE r.name = 'newRole' AND g.name IN ('Group1', 'Group2', 'Group3', 'Group4', 'Group5')
      AND NOT EXISTS (SELECT gr2.*
         FROM Group.g2 INNER JOIN GROUP_ROLES gr2 ON g2.id = gr2.group_id INNER JOIN ROLE r2 ON gr2.roles_id = r2.id
         WHERE r2.name = 'newRole' AND g2.name IN ('Group1', 'Group2', 'Group3', 'Group4', 'Group5')
           AND gr.group_id = gr2.group_id AND gr.roles_id = gr2.roles_id)


I don't know that that's better though.  

You can avoid the EXISTS checks entirely if you put a UNIQUE index on group_id and roles_id in the GROUP_ROLES table.  Although you'll want to catch exceptions in that case.  

For the obvious reasons, I haven't tested any of this.  You can test the SELECT queries pretty easily, and it's not much harder to test the if not exists notation.